HTML & CSS / Basics / Html Tags
HTML TAGS
-
STEPS
remember that every HTML element is enclosed by an open tag and a closing tag. And the content goes inside them. Let’s see the image to understand.
1- html tag
This tag is the most basic HTML tag. Without this tag, our HTML code will not work correctly. All HTML documents will begin with open tag and end with close tag.
2- head tag
you will add a head tag which will also always use after the HTML tag when you start your HTML document. As given below:
3- Title Tag
Now, in the head tag, we use the title tag. Similar to the other three tags, this will always use in between head tags. And in the title tag, we write our webpage title.
my webpage 4- body tag
Then, after the head and title tag, we use our most basic tag the body tag. In this tag, we write all our content. So, the body tag uses to display all webpage content. There is only one body tag in HTML.
my webpage 5 -heading tags (h1 to h6)
Now we will use heading tags. There are six types of headings.
h1 is the biggest heading.
h3 is smaller than h2.
h4 is smaller than h3.
h5 is smaller than h5.
h6 is the smallest headingmy webpage heading 1
heading 2
heading 3
heading 4
heading 5
heading 6
6- p or paragraphs tags
Now, we will use a p tag mean a paragraph tag, p tag uses to write paragraphs in an HTML webpage.
my webpage heading 1
heading 2
heading 3
heading 4
heading 5
heading 6
this is a paragraph tag
7- a tag or hyperlink tag
Furthermore, tags are used for adding links in HTML. We use href attribute in an open tag and give that attribute a site URL.
Twitter 8- imag tag
So this tag is used for adding images to a webpage. This tag has no closing tag. In tag, we give it an src attribute and give it a value of image file location.
14. Layouts
1. div tagIt defines a division or a section in an HTML page. It is used as a container for HTML elements.
2. header tag…It is used to define header for a document.
3. main tag… It is used to define main content for a document
4. footer tag… It is used to define footer for a document.
5. section tagIt defines a section in a document.
6. aside tag… It is used to define side content like sidebar in a document.
7. nav tagIt defines navigation links.
UsageMain Content
Paragarpgh-1
HTML tags sheet